Add configurable add-project shortcut - #4258
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review This PR adds a new user-facing keyboard shortcut (alt+a) for the add-project action. While well-implemented with tests, new features introducing user-facing behavior warrant human review. You can customize Macroscope's approvability policy. Learn more. |
e7cb807 to
42b605f
Compare
Dismissing prior approval to re-evaluate 51e185e
681668e to
48a7327
Compare
ac10e74 to
b9a4196
Compare
2e0cf21 to
d1740c6
Compare
… and pingdotgg#4599 The published build already carried pingdotgg#4605 and pingdotgg#4599 -- stack-build-info.json on t3code/stack lists both -- but the manifest edits that admitted them were never committed here, so the recorded intent had drifted from the artifact and a rebuild would have dropped two features. Restore them at the OIDs the published build resolved, then append pingdotgg#4624. pingdotgg#4624 is closed upstream without merging; carried because the replay cost is real on this phone. Its head carries a fix past the PR: the 200ms code-highlight debounces could never fire, because a growing code block's React key encodes its source offsets and the block remounts on every delta. Also refresh two pins that the artifact had moved past (the thread-picker group and local/nix-flake), and re-audit the exception set: the group rebuild at c5a4a73 shrank the CommandPalette losses on pingdotgg#4263/pingdotgg#4258/pingdotgg#4426 from 29/28/19 to 3/3/4. pingdotgg#4590's waiver is rewritten -- its 32 missing lines are an unbuilt branch revision, not a resolution loss, because the group is still pinned at the older member head.
88cfcca to
7c2a7f9
Compare
# Conflicts: # apps/web/src/components/CommandPalette.logic.test.ts # apps/web/src/components/CommandPalette.tsx
# Conflicts: # apps/web/src/components/CommandPalette.logic.test.ts # apps/web/src/components/CommandPalette.tsx
All 41 writable topics were rebased onto upstream b4680cb and force-pushed, so every pin here moved. The thread-picker group was rebuilt at the new member heads, which also clears the stale-pin gap that had pingdotgg#4590's newer revision sitting in no build. Two cumulative branches -- t3code/client-suite (37 commits) and t3code/unify-environment-selection (41) -- were replayed as a single content-identical commit each rather than rebased commit-by-commit. They rewrite their own files repeatedly, so each intermediate replay conflicted against a state present in no final tree and with no oracle to resolve it against; that is how the sidebar host-name and accent-color features were lost once before. Applying base..tip instead reproduced both contributions exactly -- verified line for line: 113 files / 6269 added lines and 131 files / 6686 added lines, both unchanged. Old heads are preserved under refs/refresh-backup/. Removed stack/patches/t3code-command-palette-logic-helpers.patch from the group manifest. It predated the members carrying those helpers themselves: it deleted shouldHandleCommandPaletteShortcut and shouldClearAddProjectEnvironmentOnPop and stripped isLoaded from resolveNewThreadOnIntent, while adding three helpers nothing in the assembled tree calls. Once the members were rebased, the assembled CommandPalette.tsx imported both deleted symbols, and the web build failed with two MISSING_EXPORT errors. Dropping it also shrank the audited CommandPalette losses on pingdotgg#4263/pingdotgg#4258/pingdotgg#4426 from 10/7/7 to 3/3/4. Added patches/t3code-dedupe-environment-icon.patch. client-suite and unify-environment-selection each add the same EnvironmentIcon helper to BranchToolbarEnvironmentSelector.tsx; git merges both without conflict and the result fails to parse. Genuinely stack-emergent, so it cannot live on either topic. Only the esbuild syntax gate catches this class -- the content audit looks for missing lines, not duplicated ones. pingdotgg#4624 is now a branch-linked topic with no `pr` key: it was closed upstream without merging, so the branch is authoritative and the entry must not be dropped on account of the PR's state. Ladder: syntax gate clean, content audit exits 0, nix build exits 0, smoke check exits 0.
7c2a7f9 to
0dcb2e9
Compare
Summary
project.addkeybinding with a default ofalt+aWhy
T3 Code already models user-facing shortcuts as named, configurable commands. Using that same system keeps shortcut conflict resolution, per-user overrides, and the Keybindings settings UI consistent instead of hard-coding a palette-only key. Plain
Alt+Ais unused by the app;Ctrl+Aremains available for standard Select All behavior.Validation
vp test packages/contracts/src/keybindings.test.ts apps/web/src/keybindings.test.ts apps/server/src/keybindings.test.tsvp checkvp run typecheckExact-head evidence
Revalidated at ac10e74 on current main (9a0a071): focused tests, vp check, and vp run typecheck passed. The capture uses only disposable local projects.
Note
Low Risk
UI and keybinding changes only; no auth, data, or API surface changes beyond registering a new command name.
Overview
Adds a new
project.addkeybinding command (defaultalt+a, disabled while the terminal is focused) across contracts, shared defaults, and server bootstrap tests, so users can rebind it like other shortcuts.The command palette now routes
project.addto the existing add-project flow instead of only toggling the palette.shouldHandleCommandPaletteShortcutavoids stealing Alt+A from editors unless the palette is open (so the search field can still trigger add project). Add-project submenu state is tracked withflowBaseDepthRefand reset helpers so nested navigation and re-opening flows behave correctly.Add project appears in the New thread in… picker (via
buildNewThreadInGroups) with the shortcut label shown on the action.Reviewed by Cursor Bugbot for commit 0dcb2e9. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add configurable
project.addshortcut bound to Alt+Aproject.addas a valid keybinding command and maps it toalt+aby default (only when terminal is not focused) inpackages/shared/src/keybindings.ts.CommandPalettekeydown handler to callopenAddProject()when the resolved command isproject.add, and suppresses the shortcut when focus is in an editable element.shouldHandleCommandPaletteShortcuthelper inapps/web/src/components/CommandPalette.logic.tsthat gates shortcut handling on command type and editable-target state.⌥Ashortcut label, including inside the "New thread in…" submenu.Macroscope summarized 7c2a7f9.